package com.kaochong.xcx.dao;

import com.kaochong.xcx.entity.UserInfo;
import com.kaochong.xcx.pojo.dto.TargetPeopleDTO;

import org.springframework.data.repository.query.Param;

import java.util.List;

public interface UserInfoMapper {
    int deleteByPrimaryKey(String targetMarkId);

    int insert(UserInfo record);

    int insertSelective(UserInfo record);

    UserInfo selectByPrimaryKey(String targetMarkId);

    int updateByPrimaryKeySelective(UserInfo record);

    int updateByPrimaryKeyWithBLOBs(UserInfo record);

    int updateByPrimaryKey(UserInfo record);
    
    /***************************自定义方法*******************************/
    UserInfo findByUserIdAndTarget(@Param("userId") Long userId, @Param("target") Integer target);
    
    List<UserInfo> findByUserId(Long userId);
    
    List<TargetPeopleDTO> countEveryTargetNum();
}